﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;
using RuleCode.Table;

namespace map.member
{
    public partial class pblog : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                bind1();

            }
        }

        private void bind1()
        {
            cbuser us = cbuser.Find(" cbuserid = '" + AliApi.appUserId + "' ");
            //HyperLink_openblog.NavigateUrl = "http://" + us.RECID.ToString() + ".blog.f980.com/";
            HyperLink_openblog.NavigateUrl = ResolveUrl("~/blog.aspx") + "?userid=" + us.RECID.ToString();

            if (us.blogtitle.ToString() != "")
            {
                Label_name.Text = us.blogtitle.ToString();
            }
            else
            {
                Label_name.Text = us.cbusernickname.ToString() + "的博客首页";
            }
            DataTable a1;
            string sql = "";
            sql = " select sum(isnull(chakanshu,0)) from cblist where cbstatus = '有效' "
                + " and cbuserid = '" + us.cbuserid.ToString() + "' and cblisttype = '发帖'";
            a1 = RuleCode.Common.SqlHelper.Instance.ExecuteQuery(sql).Tables[0];
            int jsq = zfunction.str2int(a1.Rows[0].ItemArray[0].ToString()) + us.cbloginquantity.Value;
            Label_fwl.Text = jsq.ToString();

        }


    }
}
